Rmd Settings
Contents
covid_on_unemp_benefit_numberのOLSとWLS
Read data/分析用データの読み込み
df_analysis <- readr::read_csv("output/df_analysis.csv")
## Parsed with column specification:
## cols(
## .default = col_double(),
## prefec_kanji = col_character(),
## prefecture = col_character(),
## date = col_date(format = ""),
## prefec = col_character(),
## prefec_kanji2 = col_character()
## )
## See spec(...) for full column specifications.
Main figures in the paper
- We firstly provide estimations and figures used in the main text.
- These chunks are copied and pasted from subsequent outcome-based result sections.
- Actual graphs and tables in the paper are generated and saved in the subsequent chunks, not the chunks in this section. But they are identical.
Y = emergency small amount funds/緊急小口の決定件数
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$koguchi_number,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results, include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_loan(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "koguchi_number_OLS")
# graph
graph_koguchi_number_OLS <- event_study_graph_2nd_safetynet(data = df_estimates,
graph_title = "koguchi_number_OLS")
graph_koguchi_number_OLS
## Warning: Removed 2 rows containing missing values (geom_point).

estimates_koguchi_number_OLS <- df_estimates #for robustness check
WLS, no trends, post-covid-month dummies, TableC.5 (2)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$koguchi_number,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 2 coefficients not defined because the design matrix is rank deficient
##
## ===================================
## Model 1
## -----------------------------------
## treat_var:date_2020_02
##
## treat_var:date_2020_03
##
## treat_var:date_2020_04 18.693
## (21.755)
## treat_var:date_2020_05 73.809
## (42.459)
## treat_var:date_2020_06 88.737 **
## (32.461)
## treat_var:date_2020_07 34.658
## (21.043)
## treat_var:date_2020_08 27.131
## (14.347)
## treat_var:date_2020_09 21.844
## (15.209)
## -----------------------------------
## R^2 0.813
## Adj. R^2 0.798
## Num. obs. 893
## RMSE 1373.807
## N Clusters 47
## ===================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "koguchi_number_WLS")
# Event study graph
graph_koguchi_number_WLS_onlypost <- event_study_graph_2nd_safetynet(data = df_estimates ,
graph_title = "koguchi_number_WLS")
ggplotly(graph_koguchi_number_WLS_onlypost)
estimates_koguchi_number_WLS_onlypost <- df_estimates #for robustness check
results_koguchi_number_WLS_onlypost <- estimation_results # for only-post DID table
Y = emergency small amount funds/緊急小口の決定件数 with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$koguchi_number,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results, include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_loan(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "koguchi_number_OLS")
# graph
graph_koguchi_number_OLS_covar <- event_study_graph_2nd_safetynet(data = df_estimates,
graph_title = "koguchi_number_OLS")
graph_koguchi_number_OLS_covar
## Warning: Removed 2 rows containing missing values (geom_point).

estimates_koguchi_number_OLS_covar <- df_estimates #for robustness check
WLS, no trends, post-covid-month dummies, TableC.6 (2)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$koguchi_number,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 18 coefficients not defined because the design matrix is rank deficient
##
## ===================================================================
## Model 1
## -------------------------------------------------------------------
## treat_var:date_2020_02
##
## treat_var:date_2020_03
##
## treat_var:date_2020_04 4.930
## (26.958)
## treat_var:date_2020_05 60.018
## (50.170)
## treat_var:date_2020_06 49.219
## (51.683)
## treat_var:date_2020_07 13.598
## (27.849)
## treat_var:date_2020_08 20.315
## (20.073)
## treat_var:date_2020_09 36.587
## (24.173)
## date_2020_02:google_mobility_index_2020may
##
## date_2020_03:google_mobility_index_2020may
##
## date_2020_04:google_mobility_index_2020may 1.374
## (5.892)
## date_2020_05:google_mobility_index_2020may -1.316
## (5.831)
## date_2020_06:google_mobility_index_2020may 0.190
## (5.464)
## date_2020_07:google_mobility_index_2020may -1.502
## (3.367)
## date_2020_08:google_mobility_index_2020may -0.620
## (2.170)
## date_2020_09:google_mobility_index_2020may -0.651
## (2.108)
## date_2020_02:infection_rate_cumulative2020jun
##
## date_2020_03:infection_rate_cumulative2020jun
##
## date_2020_04:infection_rate_cumulative2020jun 2.682
## (3.092)
## date_2020_05:infection_rate_cumulative2020jun 5.174
## (6.146)
## date_2020_06:infection_rate_cumulative2020jun 3.776
## (6.438)
## date_2020_07:infection_rate_cumulative2020jun 2.125
## (3.591)
## date_2020_08:infection_rate_cumulative2020jun 1.278
## (2.253)
## date_2020_09:infection_rate_cumulative2020jun 0.788
## (2.295)
## date_2020_02:death_rate_cumulative2020jun
##
## date_2020_03:death_rate_cumulative2020jun
##
## date_2020_04:death_rate_cumulative2020jun -6.274
## (36.560)
## date_2020_05:death_rate_cumulative2020jun -29.915
## (66.644)
## date_2020_06:death_rate_cumulative2020jun -34.880
## (73.642)
## date_2020_07:death_rate_cumulative2020jun -16.860
## (40.827)
## date_2020_08:death_rate_cumulative2020jun -12.132
## (24.491)
## date_2020_09:death_rate_cumulative2020jun -12.020
## (24.794)
## date_2020_02:Population_per_1_km_2_of_inhabitable_area
##
## date_2020_03:Population_per_1_km_2_of_inhabitable_area
##
## date_2020_04:Population_per_1_km_2_of_inhabitable_area -0.008
## (0.011)
## date_2020_05:Population_per_1_km_2_of_inhabitable_area 0.007
## (0.013)
## date_2020_06:Population_per_1_km_2_of_inhabitable_area 0.010
## (0.011)
## date_2020_07:Population_per_1_km_2_of_inhabitable_area 0.003
## (0.007)
## date_2020_08:Population_per_1_km_2_of_inhabitable_area 0.003
## (0.004)
## date_2020_09:Population_per_1_km_2_of_inhabitable_area 0.002
## (0.005)
## date_2020_02:Secondary_industry_ratio
##
## date_2020_03:Secondary_industry_ratio
##
## date_2020_04:Secondary_industry_ratio -667.459
## (442.774)
## date_2020_05:Secondary_industry_ratio -985.886
## (587.080)
## date_2020_06:Secondary_industry_ratio -238.691
## (518.826)
## date_2020_07:Secondary_industry_ratio -383.631
## (313.221)
## date_2020_08:Secondary_industry_ratio -244.567
## (220.753)
## date_2020_09:Secondary_industry_ratio -165.786
## (201.059)
## date_2020_02:Tertiary_industry_ratio
##
## date_2020_03:Tertiary_industry_ratio
##
## date_2020_04:Tertiary_industry_ratio -455.123
## (534.328)
## date_2020_05:Tertiary_industry_ratio -887.245
## (735.903)
## date_2020_06:Tertiary_industry_ratio -122.924
## (802.274)
## date_2020_07:Tertiary_industry_ratio -428.676
## (462.374)
## date_2020_08:Tertiary_industry_ratio -288.427
## (290.466)
## date_2020_09:Tertiary_industry_ratio -281.342
## (282.172)
## date_2020_02:Total_population
##
## date_2020_03:Total_population
##
## date_2020_04:Total_population -0.026
## (0.072)
## date_2020_05:Total_population -0.266 *
## (0.101)
## date_2020_06:Total_population -0.181 *
## (0.080)
## date_2020_07:Total_population -0.124 *
## (0.052)
## date_2020_08:Total_population -0.101 *
## (0.038)
## date_2020_09:Total_population -0.101 **
## (0.029)
## date_2020_02:Ratio_of_aged_population
##
## date_2020_03:Ratio_of_aged_population
##
## date_2020_04:Ratio_of_aged_population -2.168
## (2.940)
## date_2020_05:Ratio_of_aged_population -6.500
## (3.893)
## date_2020_06:Ratio_of_aged_population -7.335 *
## (3.234)
## date_2020_07:Ratio_of_aged_population -5.744 **
## (2.063)
## date_2020_08:Ratio_of_aged_population -4.188 **
## (1.532)
## date_2020_09:Ratio_of_aged_population -3.826 **
## (1.290)
## -------------------------------------------------------------------
## R^2 0.889
## Adj. R^2 0.872
## Num. obs. 893
## RMSE 1091.258
## N Clusters 47
## ===================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "koguchi_number_WLS")
# Event study graph
graph_koguchi_number_WLS_covar_onlypost <- event_study_graph_2nd_safetynet(data = df_estimates ,
graph_title = "koguchi_number_WLS")
ggplotly(graph_koguchi_number_WLS_covar_onlypost)
estimates_koguchi_number_WLS_covar_onlypost <- df_estimates #for robustness check
results_koguchi_number_WLS_covar_onlypost <- estimation_results # for only-post DID table
Y= general support funds/総合支援の決定件数
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$sogo_number,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results, include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_loan(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "sogo_number_OLS")
# graph
graph_sogo_number_OLS <- event_study_graph_2nd_safetynet(data = df_estimates,
graph_title = "sogo_number_OLS")
graph_sogo_number_OLS
## Warning: Removed 2 rows containing missing values (geom_point).

estimates_sogo_number_OLS <- df_estimates #for robustness check
WLS, no trends, post-covid-month dummies, Table C.5 (4)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$sogo_number,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 2 coefficients not defined because the design matrix is rank deficient
##
## ===================================
## Model 1
## -----------------------------------
## treat_var:date_2020_02
##
## treat_var:date_2020_03
##
## treat_var:date_2020_04 -0.410
## (1.522)
## treat_var:date_2020_05 9.863
## (12.136)
## treat_var:date_2020_06 54.371
## (29.696)
## treat_var:date_2020_07 82.429 *
## (31.538)
## treat_var:date_2020_08 52.048 **
## (16.772)
## treat_var:date_2020_09 43.055
## (23.427)
## -----------------------------------
## R^2 0.748
## Adj. R^2 0.726
## Num. obs. 893
## RMSE 1070.294
## N Clusters 47
## ===================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "sogo_number_WLS")
# Event study graph
graph_sogo_number_WLS_onlypost <- event_study_graph_2nd_safetynet(data = df_estimates ,
graph_title = "sogo_number_WLS")
ggplotly(graph_sogo_number_WLS_onlypost)
estimates_sogo_number_WLS_onlypost <- df_estimates #for robustness check
results_sogo_number_WLS_onlypost <- estimation_results # for only-post DID table
Y= general support funds/総合支援の決定件数 with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$sogo_number,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results, include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_loan(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "sogo_number_OLS")
# graph
graph_sogo_number_OLS_covar <- event_study_graph_2nd_safetynet(data = df_estimates,
graph_title = "sogo_number_OLS")
graph_sogo_number_OLS_covar
## Warning: Removed 2 rows containing missing values (geom_point).

estimates_sogo_number_OLS_covar <- df_estimates #for robustness check
WLS, no trends, post-covid-month dummies, Table C.6 (4)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$sogo_number,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 18 coefficients not defined because the design matrix is rank deficient
##
## ====================================================================
## Model 1
## --------------------------------------------------------------------
## treat_var:date_2020_02
##
## treat_var:date_2020_03
##
## treat_var:date_2020_04 0.008
## (3.318)
## treat_var:date_2020_05 9.237
## (18.451)
## treat_var:date_2020_06 62.343
## (34.059)
## treat_var:date_2020_07 87.782 *
## (38.840)
## treat_var:date_2020_08 35.869
## (20.207)
## treat_var:date_2020_09 26.995
## (20.825)
## date_2020_02:google_mobility_index_2020may
##
## date_2020_03:google_mobility_index_2020may
##
## date_2020_04:google_mobility_index_2020may 0.350
## (0.454)
## date_2020_05:google_mobility_index_2020may 0.799
## (2.779)
## date_2020_06:google_mobility_index_2020may -1.830
## (3.922)
## date_2020_07:google_mobility_index_2020may -1.842
## (3.699)
## date_2020_08:google_mobility_index_2020may -1.614
## (2.703)
## date_2020_09:google_mobility_index_2020may -1.268
## (2.713)
## date_2020_02:infection_rate_cumulative2020jun
##
## date_2020_03:infection_rate_cumulative2020jun
##
## date_2020_04:infection_rate_cumulative2020jun 0.440
## (0.380)
## date_2020_05:infection_rate_cumulative2020jun 4.519
## (2.535)
## date_2020_06:infection_rate_cumulative2020jun 6.506
## (4.350)
## date_2020_07:infection_rate_cumulative2020jun 5.190
## (4.230)
## date_2020_08:infection_rate_cumulative2020jun 1.447
## (2.425)
## date_2020_09:infection_rate_cumulative2020jun 3.951
## (2.726)
## date_2020_02:death_rate_cumulative2020jun
##
## date_2020_03:death_rate_cumulative2020jun
##
## date_2020_04:death_rate_cumulative2020jun -5.812
## (4.089)
## date_2020_05:death_rate_cumulative2020jun -46.616
## (27.526)
## date_2020_06:death_rate_cumulative2020jun -65.417
## (45.834)
## date_2020_07:death_rate_cumulative2020jun -54.131
## (45.728)
## date_2020_08:death_rate_cumulative2020jun -9.899
## (28.105)
## date_2020_09:death_rate_cumulative2020jun -33.765
## (30.854)
## date_2020_02:Population_per_1_km_2_of_inhabitable_area
##
## date_2020_03:Population_per_1_km_2_of_inhabitable_area
##
## date_2020_04:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.001)
## date_2020_05:Population_per_1_km_2_of_inhabitable_area -0.001
## (0.005)
## date_2020_06:Population_per_1_km_2_of_inhabitable_area 0.002
## (0.009)
## date_2020_07:Population_per_1_km_2_of_inhabitable_area 0.008
## (0.008)
## date_2020_08:Population_per_1_km_2_of_inhabitable_area 0.008
## (0.004)
## date_2020_09:Population_per_1_km_2_of_inhabitable_area 0.007
## (0.005)
## date_2020_02:Secondary_industry_ratio
##
## date_2020_03:Secondary_industry_ratio
##
## date_2020_04:Secondary_industry_ratio -14.136
## (39.020)
## date_2020_05:Secondary_industry_ratio -68.471
## (235.838)
## date_2020_06:Secondary_industry_ratio -408.113
## (351.577)
## date_2020_07:Secondary_industry_ratio -687.034
## (395.623)
## date_2020_08:Secondary_industry_ratio -477.582
## (266.863)
## date_2020_09:Secondary_industry_ratio -576.146
## (289.630)
## date_2020_02:Tertiary_industry_ratio
##
## date_2020_03:Tertiary_industry_ratio
##
## date_2020_04:Tertiary_industry_ratio 23.022
## (61.421)
## date_2020_05:Tertiary_industry_ratio 88.732
## (413.203)
## date_2020_06:Tertiary_industry_ratio -470.488
## (527.717)
## date_2020_07:Tertiary_industry_ratio -884.672
## (547.081)
## date_2020_08:Tertiary_industry_ratio -430.582
## (371.719)
## date_2020_09:Tertiary_industry_ratio -620.040
## (359.852)
## date_2020_02:Total_population
##
## date_2020_03:Total_population
##
## date_2020_04:Total_population -0.006
## (0.004)
## date_2020_05:Total_population -0.069 **
## (0.026)
## date_2020_06:Total_population -0.176 ***
## (0.049)
## date_2020_07:Total_population -0.227 ***
## (0.056)
## date_2020_08:Total_population -0.158 ***
## (0.041)
## date_2020_09:Total_population -0.177 ***
## (0.042)
## date_2020_02:Ratio_of_aged_population
##
## date_2020_03:Ratio_of_aged_population
##
## date_2020_04:Ratio_of_aged_population 0.034
## (0.236)
## date_2020_05:Ratio_of_aged_population -1.031
## (1.260)
## date_2020_06:Ratio_of_aged_population -3.120
## (1.928)
## date_2020_07:Ratio_of_aged_population -5.840 *
## (2.427)
## date_2020_08:Ratio_of_aged_population -4.436 *
## (1.673)
## date_2020_09:Ratio_of_aged_population -4.909 **
## (1.656)
## --------------------------------------------------------------------
## R^2 0.874
## Adj. R^2 0.855
## Num. obs. 893
## RMSE 780.306
## N Clusters 47
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "sogo_number_WLS")
# Event study graph
graph_sogo_number_WLS_covar_onlypost <- event_study_graph_2nd_safetynet(data = df_estimates ,
graph_title = "sogo_number_WLS")
ggplotly(graph_sogo_number_WLS_covar_onlypost)
estimates_sogo_number_WLS_covar_onlypost <- df_estimates #for robustness check
results_sogo_number_WLS_covar_onlypost <- estimation_results # for only-post DID table
Y = housing security benefit/住居確保給付金の決定件数
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_jukyo_OLS(dataset = df_analysis,
outcome_var = df_analysis$jukyo_number,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_jukyo(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "jukyo_number_OLS")
# Event study graph
graph_jukyo_number_OLS <- event_study_graph_jukyo(data = df_estimates,
graph_title = "jukyo_number_OLS")
graph_jukyo_number_OLS
## Warning: Removed 12 rows containing missing values (geom_point).

estimates_jukyo_number_OLS <- df_estimates #for robustness check
WLS, no trends, post-covid-month dummies,Table C.5 (6)
# DID estimation
estimation_results <- dynamic_onlypost_DID_jukyo_WLS(dataset = df_analysis,
outcome_var = df_analysis$jukyo_number,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
##
## ==================================
## Model 1
## ----------------------------------
## treat_var:date_2020_04 1.028
## (0.711)
## treat_var:date_2020_05 15.236 *
## (6.932)
## treat_var:date_2020_06 27.509 **
## (9.317)
## treat_var:date_2020_07 15.259 **
## (5.281)
## treat_var:date_2020_08 6.540 *
## (2.972)
## treat_var:date_2020_09 4.367 *
## (2.124)
## ----------------------------------
## R^2 0.785
## Adj. R^2 0.750
## Num. obs. 423
## RMSE 362.045
## N Clusters 47
## ==================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "jukyo_number_WLS")
# Event study graph
graph_jukyo_number_WLS_onlypost <- event_study_graph(data = df_estimates ,
graph_title = "jukyo_number_WLS")
ggplotly(graph_jukyo_number_WLS_onlypost)
estimates_jukyo_number_WLS_onlypost <- df_estimates #for robustness check
results_jukyo_number_WLS_onlypost <- estimation_results # for only-post DID table
Y = housing security benefit/住居確保給付金の決定件数 with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_jukyo_OLS_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$jukyo_number,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_jukyo(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "jukyo_number_OLS")
# Event study graph
graph_jukyo_number_OLS_covar <- event_study_graph_jukyo(data = df_estimates,
graph_title = "jukyo_number_OLS")
graph_jukyo_number_OLS_covar
## Warning: Removed 12 rows containing missing values (geom_point).

estimates_jukyo_number_OLS_covar <- df_estimates #for robustness check
WLS, no trends, post-covid-month dummies, Table C.6 (6)
# DID estimation
estimation_results <- dynamic_onlypost_DID_jukyo_WLS_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$jukyo_number,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
##
## ====================================================================
## Model 1
## --------------------------------------------------------------------
## treat_var:date_2020_04 -1.147
## (0.804)
## treat_var:date_2020_05 -5.345
## (3.697)
## treat_var:date_2020_06 -4.412
## (2.745)
## treat_var:date_2020_07 -1.220
## (2.225)
## treat_var:date_2020_08 -2.033 *
## (0.985)
## treat_var:date_2020_09 -1.230
## (0.676)
## date_2020_04:google_mobility_index_2020may -0.024
## (0.148)
## date_2020_05:google_mobility_index_2020may -0.060
## (0.710)
## date_2020_06:google_mobility_index_2020may -1.568 *
## (0.750)
## date_2020_07:google_mobility_index_2020may -0.943
## (0.589)
## date_2020_08:google_mobility_index_2020may -0.504 *
## (0.240)
## date_2020_09:google_mobility_index_2020may -0.319
## (0.164)
## date_2020_04:infection_rate_cumulative2020jun 0.002
## (0.072)
## date_2020_05:infection_rate_cumulative2020jun 0.551
## (0.444)
## date_2020_06:infection_rate_cumulative2020jun 0.415
## (0.403)
## date_2020_07:infection_rate_cumulative2020jun 0.406
## (0.312)
## date_2020_08:infection_rate_cumulative2020jun 0.291 *
## (0.141)
## date_2020_09:infection_rate_cumulative2020jun 0.209
## (0.132)
## date_2020_04:death_rate_cumulative2020jun 0.478
## (0.677)
## date_2020_05:death_rate_cumulative2020jun 0.226
## (4.425)
## date_2020_06:death_rate_cumulative2020jun -2.383
## (4.116)
## date_2020_07:death_rate_cumulative2020jun -3.733
## (3.070)
## date_2020_08:death_rate_cumulative2020jun -2.790
## (1.541)
## date_2020_09:death_rate_cumulative2020jun -1.978
## (1.300)
## date_2020_04:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_05:Population_per_1_km_2_of_inhabitable_area 0.003 **
## (0.001)
## date_2020_06:Population_per_1_km_2_of_inhabitable_area 0.005 ***
## (0.001)
## date_2020_07:Population_per_1_km_2_of_inhabitable_area 0.002
## (0.001)
## date_2020_08:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_09:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_04:Secondary_industry_ratio -23.782 *
## (11.672)
## date_2020_05:Secondary_industry_ratio -127.705
## (65.678)
## date_2020_06:Secondary_industry_ratio -109.665 **
## (36.263)
## date_2020_07:Secondary_industry_ratio -15.060
## (43.642)
## date_2020_08:Secondary_industry_ratio -37.852 **
## (13.102)
## date_2020_09:Secondary_industry_ratio -30.531 **
## (10.044)
## date_2020_04:Tertiary_industry_ratio -12.907
## (11.978)
## date_2020_05:Tertiary_industry_ratio -56.344
## (75.533)
## date_2020_06:Tertiary_industry_ratio -49.819
## (50.714)
## date_2020_07:Tertiary_industry_ratio -14.300
## (54.424)
## date_2020_08:Tertiary_industry_ratio -31.769
## (19.491)
## date_2020_09:Tertiary_industry_ratio -33.438 *
## (13.639)
## date_2020_04:Total_population -0.002
## (0.001)
## date_2020_05:Total_population -0.026 *
## (0.010)
## date_2020_06:Total_population -0.026 **
## (0.008)
## date_2020_07:Total_population -0.003
## (0.007)
## date_2020_08:Total_population -0.003
## (0.002)
## date_2020_09:Total_population -0.003
## (0.002)
## date_2020_04:Ratio_of_aged_population -0.054
## (0.087)
## date_2020_05:Ratio_of_aged_population -0.913 *
## (0.414)
## date_2020_06:Ratio_of_aged_population -0.504
## (0.360)
## date_2020_07:Ratio_of_aged_population -0.102
## (0.271)
## date_2020_08:Ratio_of_aged_population -0.165
## (0.118)
## date_2020_09:Ratio_of_aged_population -0.145
## (0.091)
## --------------------------------------------------------------------
## R^2 0.972
## Adj. R^2 0.963
## Num. obs. 423
## RMSE 139.595
## N Clusters 47
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "jukyo_number_WLS")
# Event study graph
graph_jukyo_number_WLS_covar_onlypost <- event_study_graph(data = df_estimates ,
graph_title = "jukyo_number_WLS")
ggplotly(graph_jukyo_number_WLS_covar_onlypost)
estimates_jukyo_number_WLS_covar_onlypost <- df_estimates #for robustness check
results_jukyo_number_WLS_covar_onlypost <- estimation_results # for only-post DID table
Merge outcome results/アウトカム結果の結合
emergency small amount funds/緊急小口
#merge and label estimates data
estimates_koguchi_number_bind <- dplyr::bind_rows(estimates_koguchi_number_OLS,
estimates_koguchi_number_WLS)
#change labels and reorder labels
estimates_koguchi_number_bind <- estimates_labeling_poverty(estimates_koguchi_number_bind)
#graph
graph_koguchi_number_bind <- event_study_graph_bind_legend(data = estimates_koguchi_number_bind,
graph_title = "Emergency Small Amount Funds") +
theme(legend.position = 'none')
ggplotly(graph_koguchi_number_bind)
emergency small amount funds/緊急小口 with covar
#merge and label estimates data
estimates_koguchi_number_bind <- dplyr::bind_rows(estimates_koguchi_number_OLS_covar,
estimates_koguchi_number_WLS_covar)
#change labels and reorder labels
estimates_koguchi_number_bind <- estimates_labeling_poverty(estimates_koguchi_number_bind)
#graph
graph_koguchi_number_bind_covar <- event_study_graph_bind_legend(data = estimates_koguchi_number_bind,
graph_title = "Emergency Small Amount Funds, with covariates") +
theme(legend.position = 'none')
ggplotly(graph_koguchi_number_bind_covar)
general support funds/総合支援
#merge and label estimates data
estimates_sogo_number_bind <- dplyr::bind_rows(estimates_sogo_number_OLS,
estimates_sogo_number_WLS)
#change labels and reorder labels
estimates_sogo_number_bind <- estimates_labeling_poverty(estimates_sogo_number_bind)
#graph
graph_sogo_number_bind <- event_study_graph_bind_legend(data = estimates_sogo_number_bind,
graph_title = "General Support Funds") +
theme(legend.position = 'none')
ggplotly(graph_sogo_number_bind)
general support funds/総合支援 with covar
#merge and label estimates data
estimates_sogo_number_bind <- dplyr::bind_rows(estimates_sogo_number_OLS_covar,
estimates_sogo_number_WLS_covar)
#change labels and reorder labels
estimates_sogo_number_bind <- estimates_labeling_poverty(estimates_sogo_number_bind)
#graph
graph_sogo_number_bind_covar <- event_study_graph_bind_legend(data = estimates_sogo_number_bind,
graph_title = "General Support Funds, with covariates") +
theme(legend.position = 'none')
ggplotly(graph_sogo_number_bind_covar)
housing security benefit/居住確保給付金
#merge and label estimates data
estimates_jukyo_number_bind <- dplyr::bind_rows(estimates_jukyo_number_OLS,
estimates_jukyo_number_WLS)
#change labels and reorder labels
estimates_jukyo_number_bind <- estimates_labeling_poverty(estimates_jukyo_number_bind)
#graph
graph_jukyo_number_bind <- event_study_graph_bind_legend(data = estimates_jukyo_number_bind,
graph_title = "Housing Security Benefit") +
theme(legend.position = 'none')
ggplotly(graph_jukyo_number_bind)
housing security benefit/居住確保給付金 with covar
#merge and label estimates data
estimates_jukyo_number_bind <- dplyr::bind_rows(estimates_jukyo_number_OLS_covar,
estimates_jukyo_number_WLS_covar)
#change labels and reorder labels
estimates_jukyo_number_bind <- estimates_labeling_poverty(estimates_jukyo_number_bind)
#graph
graph_jukyo_number_bind_covar <- event_study_graph_bind_legend(data = estimates_jukyo_number_bind,
graph_title = "Housing Security Benefit, with covariates") +
theme(legend.position = 'none')
ggplotly(graph_jukyo_number_bind_covar)
GGplotly
ggplotly(graph_koguchi_number_bind)
ggplotly(graph_koguchi_number_bind_covar)
ggplotly(graph_sogo_number_bind)
ggplotly(graph_sogo_number_bind_covar)
ggplotly(graph_jukyo_number_bind)
ggplotly(graph_jukyo_number_bind_covar)
Merge graphs/グラフ統合
Merge/統合
グラフを統合して論文用に保存。 ### graph size
dpi_num <- 100
width_num <- 15
height_num <- 15
WLS
ymin <- - 50
ymax <- 155
ymin_num <- - 50
ymax_num <- 150
interval <- 25
graph_koguchi_number_WLS <- graph_koguchi_number_WLS +
labs(title = "(a) Emergency Small Amount Funds") +
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_koguchi_number_WLS_covar <- graph_koguchi_number_WLS_covar +
labs(title = "(b) Emergency Small Amount Funds, with covariates") +
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_sogo_number_WLS <- graph_sogo_number_WLS +
labs(title = "(c) General Support Funds")+
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_sogo_number_WLS_covar <- graph_sogo_number_WLS_covar +
labs(title = "(d) General Support Funds, with covariates") +
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_jukyo_number_WLS <- graph_jukyo_number_WLS +
labs(title = "(e) Housing Security Benefit") +
scale_y_continuous(limit = c(-15, 50), breaks=seq(-10, 50, 10))
graph_jukyo_number_WLS_covar <- graph_jukyo_number_WLS_covar +
labs(title = "(f) Housing Security Benefit, with covariates") +
scale_y_continuous(limit = c(-15, 50), breaks=seq(-10, 50, 10))
graph <- (graph_koguchi_number_WLS | graph_koguchi_number_WLS_covar) /
(graph_sogo_number_WLS | graph_sogo_number_WLS_covar) /
(graph_jukyo_number_WLS | graph_jukyo_number_WLS_covar)
graph
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 12 rows containing missing values (geom_point).
## Warning: Removed 12 rows containing missing values (geom_point).

#保存
ggsave(file = "output/graph_unemploy_diff2_on_2nd_safetynet_WLS.pdf", plot = graph,
dpi = dpi_num, width = width_num, height = height_num)
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 12 rows containing missing values (geom_point).
## Warning: Removed 12 rows containing missing values (geom_point).
Robustness check
# 2021Feb12Waki
ymin <- - 55
ymax <- 175
ymin_num <- - 50
ymax_num <- 175
interval <- 25
graph_koguchi_number_bind <- graph_koguchi_number_bind +
labs(title = "(a) Emergency Small Amount Funds") +
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_koguchi_number_bind_covar <- graph_koguchi_number_bind_covar+
labs(title = "(b) Emergency Small Amount Funds, with covariates") +
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_sogo_number_bind <- graph_sogo_number_bind+
labs(title = "(c) General Support Funds") +
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_sogo_number_bind_covar <- graph_sogo_number_bind_covar+
labs(title = "(d) General Support Funds, with covariates") +
scale_y_continuous(limit = c(ymin, ymax), breaks=seq(ymin_num, ymax_num, interval))
graph_jukyo_number_bind <- graph_jukyo_number_bind+
labs(title = "(e) Housing Security Benefit") +
scale_y_continuous(limit = c(-15, 50), breaks=seq(-10, 50, 10))
graph_jukyo_number_bind_covar <- graph_jukyo_number_bind_covar+
labs(title = "(f) Housing Security Benefit, with covariates") +
scale_y_continuous(limit = c(-15, 50), breaks=seq(-10, 50, 10))
graph_2nd_tier_diff_models <- (graph_koguchi_number_bind + graph_koguchi_number_bind_covar)/
(graph_sogo_number_bind + graph_sogo_number_bind_covar)/
(graph_jukyo_number_bind + graph_jukyo_number_bind_covar)/legend_model_types +
plot_layout(heights = c(2,2,2, 0.5)) #0.3から0.5へ変更 2021Sep7 Waki
graph_2nd_tier_diff_models
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 24 rows containing missing values (geom_point).
## Warning: Removed 24 rows containing missing values (geom_point).

#保存
ggsave(file = "output/graph_unemploy_diff2_on_2nd_safetynet_robust.pdf", plot = graph_2nd_tier_diff_models,
dpi = dpi_num, width = width_num, height = height_num)
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 24 rows containing missing values (geom_point).
## Warning: Removed 24 rows containing missing values (geom_point).
Regression table/回帰結果表 without covar
options("modelsummary_format_numeric_latex" = "plain")
# 列の選択 column order
# 緊急小口、総合支援、住居確保、YOYのみ, monthlyhのみ
rows_MONTH <- tribble(~name, ~"(1)", ~"(2)", ~"(3)", ~"(4)", ~"(5)", ~"(6)",
"Ref. month", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}","\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}")
## results list
table_results_MONTH <- list()
table_results_MONTH[["(1)"]] <- results_koguchi_number_WLS
table_results_MONTH[["(2)"]] <- results_koguchi_number_WLS_onlypost
table_results_MONTH[["(3)"]] <- results_sogo_number_WLS
table_results_MONTH[["(4)"]] <- results_sogo_number_WLS_onlypost
table_results_MONTH[["(5)"]] <- results_jukyo_number_WLS
table_results_MONTH[["(6)"]] <- results_jukyo_number_WLS_onlypost
## HTML table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
title_words = "UIbenefit",
gof = gm,
output_style = "html") %>%
kableExtra::add_header_above(c(" " = 1, "Emergency S.A." = 2, "General Support" = 2, "Housing Security" = 2))
## 14 coefficients not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 14 coefficients not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
UIbenefit
|
|
Emergency S.A.
|
General Support
|
Housing Security
|
|
|
|
|
|
|
|
|
|
Apr. 2020
|
18.723
|
18.693
|
−0.395
|
−0.410
|
1.103
|
1.028
|
|
|
(21.950)
|
(21.755)
|
(1.539)
|
(1.522)
|
(0.730)
|
(0.711)
|
|
May. 2020
|
73.840
|
73.809
|
9.879
|
9.863
|
15.311
|
15.236
|
|
|
(42.803)
|
(42.459)
|
(12.245)
|
(12.136)
|
(6.970)
|
(6.932)
|
|
Jun. 2020
|
88.768
|
88.737
|
54.387
|
54.371
|
27.584
|
27.509
|
|
|
(32.722)
|
(32.461)
|
(29.934)
|
(29.696)
|
(9.358)
|
(9.317)
|
|
Jul. 2020
|
34.689
|
34.658
|
82.444
|
82.429
|
15.334
|
15.259
|
|
|
(21.224)
|
(21.043)
|
(31.787)
|
(31.538)
|
(5.316)
|
(5.281)
|
|
Aug. 2020
|
27.162
|
27.131
|
52.064
|
52.048
|
6.615
|
6.540
|
|
|
(14.477)
|
(14.347)
|
(16.912)
|
(16.772)
|
(2.999)
|
(2.972)
|
|
Sep. 2020
|
21.875
|
21.844
|
43.071
|
43.055
|
4.442
|
4.367
|
|
|
(15.342)
|
(15.209)
|
(23.620)
|
(23.427)
|
(2.152)
|
(2.124)
|
|
Sample size
|
893
|
893
|
893
|
893
|
423
|
423
|
|
R2 Adj.
|
0.795
|
0.798
|
0.722
|
0.726
|
0.749
|
0.750
|
|
Ref. month
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
## Latex table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
gof = gm,
title_words = "Estimation results for second-tier safety net, without covariates",
output_style = "latex") %>%
kableExtra::add_header_above(c(" " = 1, "Emergency S.A." = 2, "General Support" = 2, "Housing Security" = 2)) %>%
kableExtra::add_footnote(c("Notes: Columns (1), (3), and (5) present baseline WLS estimates shown in the left-hand side of Figure \\ref{fig:DID_unemploy_on_2nd_safetynet}. Columns (2), (4), and (6) present WLS estimates based on the model \\eqref{eq:did_model_ver2}, weighted by prefecture population size, but individual linear trends are not incorporated. The treatment variable is the COVID-19-induced employment shock, which is calculated as equation \\eqref{eq:employment_shock}. Robust standard errors are clustered at the prefecture level."),threeparttable = TRUE, notation = "none",escape = FALSE) %>%
kableExtra::column_spec(2:5, width = "1.5cm") %>%
kableExtra::save_kable("output/table_unemploy_diff2_on_2nd_safetynet_robust.tex")
## 14 coefficients not defined because the design matrix is rank deficient
##
## 2 coefficients not defined because the design matrix is rank deficient
## 14 coefficients not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
Regression table/回帰結果表 with covar
# 列の選択 column order
# 緊急小口、総合支援、住居確保、YOYのみ, monthlyhのみ
rows_MONTH <- tribble(~name, ~"(1)", ~"(2)", ~"(3)", ~"(4)", ~"(5)", ~"(6)",
"Ref. month", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}","\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}")
## results list
table_results_MONTH <- list()
table_results_MONTH[["(1)"]] <- results_koguchi_number_WLS_covar
table_results_MONTH[["(2)"]] <- results_koguchi_number_WLS_covar_onlypost
table_results_MONTH[["(3)"]] <- results_sogo_number_WLS_covar
table_results_MONTH[["(4)"]] <- results_sogo_number_WLS_covar_onlypost
table_results_MONTH[["(5)"]] <- results_jukyo_number_WLS_covar
table_results_MONTH[["(6)"]] <- results_jukyo_number_WLS_covar_onlypost
## HTML table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
title_words = "UIbenefit",
gof = gm,
output_style = "html") %>%
kableExtra::add_header_above(c(" " = 1, "Emergency S.A." = 2, "General Support" = 2, "Housing Security" = 2))
## 30 coefficients not defined because the design matrix is rank deficient
## 18 coefficients not defined because the design matrix is rank deficient
## 30 coefficients not defined because the design matrix is rank deficient
## 18 coefficients not defined because the design matrix is rank deficient
UIbenefit
|
|
Emergency S.A.
|
General Support
|
Housing Security
|
|
|
|
|
|
|
|
|
|
Apr. 2020
|
4.941
|
4.930
|
0.002
|
0.008
|
−1.072
|
−1.147
|
|
|
(27.175)
|
(26.958)
|
(3.346)
|
(3.318)
|
(0.807)
|
(0.804)
|
|
May. 2020
|
60.029
|
60.018
|
9.231
|
9.237
|
−5.270
|
−5.345
|
|
|
(50.569)
|
(50.170)
|
(18.599)
|
(18.451)
|
(3.709)
|
(3.697)
|
|
Jun. 2020
|
49.230
|
49.219
|
62.337
|
62.343
|
−4.337
|
−4.412
|
|
|
(52.096)
|
(51.683)
|
(34.330)
|
(34.059)
|
(2.750)
|
(2.745)
|
|
Jul. 2020
|
13.609
|
13.598
|
87.776
|
87.782
|
−1.145
|
−1.220
|
|
|
(28.076)
|
(27.849)
|
(39.148)
|
(38.840)
|
(2.236)
|
(2.225)
|
|
Aug. 2020
|
20.326
|
20.315
|
35.863
|
35.869
|
−1.958
|
−2.033
|
|
|
(20.236)
|
(20.073)
|
(20.370)
|
(20.207)
|
(0.986)
|
(0.985)
|
|
Sep. 2020
|
36.598
|
36.587
|
26.989
|
26.995
|
−1.155
|
−1.230
|
|
|
(24.363)
|
(24.173)
|
(20.992)
|
(20.825)
|
(0.682)
|
(0.676)
|
|
Sample size
|
893
|
893
|
893
|
893
|
423
|
423
|
|
R2 Adj.
|
0.870
|
0.872
|
0.852
|
0.855
|
0.963
|
0.963
|
|
Ref. month
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
## Latex table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
gof = gm,
title_words = "Estimation results for second-tier safety net, with covariates",
output_style = "latex") %>%
kableExtra::add_header_above(c(" " = 1, "Emergency S.A." = 2, "General Support" = 2, "Housing Security" = 2)) %>%
kableExtra::add_footnote(c("Notes: Columns (1), (3), and (5) present WLS estimates shown in the right-hand side of Figure \\ref{fig:DID_unemploy_on_2nd_safetynet}. Columns (2), (4), and (6) present WLS estimates based on the model \\eqref{eq:did_model_ver2}, weighted by prefecture population size, but individual linear trends are not incorporated and eight covariates are additionally controlled for. The treatment variable is the COVID-19-induced employment shock, which is calculated as equation \\eqref{eq:employment_shock}. Robust standard errors are clustered at the prefecture level."),threeparttable = TRUE, notation = "none",escape = FALSE) %>%
kableExtra::column_spec(2:5, width = "1.5cm") %>%
kableExtra::save_kable("output/table_unemploy_diff2_on_2nd_safetynet_robust_covar.tex")
## 30 coefficients not defined because the design matrix is rank deficient
##
## 18 coefficients not defined because the design matrix is rank deficient
## 30 coefficients not defined because the design matrix is rank deficient
## 18 coefficients not defined because the design matrix is rank deficient